Method, apparatus, and system for processng media resource playlist in local area network

ABSTRACT

A method for processing a media resource playlist in a local area network, where the local area network includes a media server and a media renderer, includes: updating a stored playlist and a stored playlist element table when determining that a state of the media server changes; and sending the updated playlist to the media renderer. In addition, a playlist processing apparatus and a communication system are provided correspondingly.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Application No. PCT/CN2012/076147, filed on May 28, 2012, which is hereby incorporated by reference in its entirety.

FIELD OF THE INVENTION

The present invention relates to the field of communication technologies, and in particular, to a method, an apparatus, and a system for processing a media resource playlist in a local area network.

BACKGROUND OF THE INVENTION

With the development of electronic digital technologies and digitization of consumer electronics, more and more digital electronic devices are emerging in families, for example, digitized entertainment devices such as a mobile phone or a camera, and household electrical appliances such as a personal computer or a digital television set. How to connect the digital electronic devices in a wired or wireless mode to constitute a local area network, for example, a home network, which can implement functions such as content sharing or mutual control, is a concept that the industry is conceiving and trying to realize. The digital electronic devices constituting the home network are called home network devices.

To facilitate interworking and control of different types of home network devices, a Uniform plug and play (UPnP, Uniform Plug and Play) technology is proposed in the prior art. UPnP is an architecture for global peer-to-peer (P2P, Peer-to-Peer) network connectivity of various digital electronic devices. In a UPnP system, a user controls a home network device through a control point (CP, Control Point) device in a home network; through the UPnP protocol and by invoking related control commands (actions) of the home network device supporting the UPnP technology (hereinafter referred to as a UPnP device), the control point device reads state information of the UPnP device in the home network and controls the UPnP device to perform corresponding operations.

To implement a scenario where multiple UPnP devices share media in the home network, UPnP defines an audio and video (AV, Audio and Video) standard; in the AV standard, three apparatuses are defined: a media server (MS, Media Server), a media-playing device (MR, Media Renderer), and a media control point (AV CP, Audio and Video Control Point). The media server is a device for storing media. The media renderer is a device for playing media. The AV CP is an apparatus for controlling the two devices. Through the AV CP, media resources of the media server may be browsed and the media of the media server may be played, which enables the media renderer to play the content in the media server. For example, as shown in FIG. 1 a, if a user wants to watch a private video stored in a mobile phone or digital camera (namely, a media server) on a digital television set (namely, a media renderer), the AV CP obtains the content information of the private video from the mobile phone or digital camera, then generates a playlist (Playlist), and sends the playlist to the digital television set for storage, so that the digital television set obtains and plays the media resources (namely, videos) according to the playlist.

In the research and practice of the prior art, the inventor of the present invention finds that: the playlist that is generated by the media server or by the AV CP and sent to the media renderer is temporary; if the media server storing the content associated with the playlist is offline, or the Internet Protocol (IP, Internet Protocol) address changes, or the content itself changes, the playlist is partly or completely invalid, which affects the play experience of the user greatly.

SUMMARY OF THE INVENTION

Embodiments of the present invention provide a method, an apparatus, and a system for processing a media resource playlist in a local area network, so that a continuously valid playlist may be provided to improve the play experience of a user.

A method for processing a media resource playlist in a local area network, where the local area network includes a media server and a media renderer, includes:

updating a stored playlist and a stored playlist element table when determining that a state of the media server changes, where the playlist includes a uniform resource locator of a media resource and a file name of the media resource, and the playlist element table includes at least one of a media resource identifier, a media server identifier, an IP address of the media server, and the uniform resource locator of the media resource; and

sending the updated playlist to the media renderer.

A playlist processing apparatus includes:

an updating unit, configured to update a stored playlist and a stored playlist element table when determining that a state of a media server in a local area network changes, where the playlist includes a uniform resource locator of a media resource and a file name of the media resource, and the playlist element table includes at least one of a media resource identifier, a media server identifier, an Internet Protocol address of the media server, and the uniform resource locator of the media resource; and

a sending unit, configured to send a generated playlist to a media renderer in the local area network, and when the playlist is updated, send the updated playlist to the media renderer in the local area network.

A communication system includes any playlist processing apparatus according to embodiments of the present invention.

In the embodiments of the present invention, when it is determined that the state of the media server changes, the stored playlist and the stored playlist element table are updated, and the updated playlist is sent to the media renderer in the local area network. In the embodiments of the present invention, because the playlist can be updated in real time, consistency between the playlist and the media source can be ensured, so that a continuously valid playlist may be provided to improve the play experience of a user.

BRIEF DESCRIPTION OF THE DRAWINGS

To illustrate the technical solutions in the embodiments of the present invention or in the prior art more clearly, the following briefly describes the accompanying drawings required for describing the embodiments or the prior art. Apparently, the accompanying drawings in the following descriptions merely show some of the embodiments of the present invention, and persons skilled in the art can derive other drawings from the accompanying drawings without creative efforts.

FIG. 1 a is a schematic diagram of a scenario of playing media resources in a local area network in the prior art;

FIG. 1 b is a flowchart of a method for processing a media resource playlist in a local area network according to an embodiment of the present invention;

FIG. 2 is another flowchart of a method for processing a media resource playlist in a local area network according to an embodiment of the present invention;

FIG. 3 is still another flowchart of a method for processing a media resource playlist in a local area network according to an embodiment of the present invention;

FIG. 4 is still another flowchart of a method for processing a media resource playlist in a local area network according to an embodiment of the present invention;

FIG. 5 a is a schematic structural diagram of a playlist processing apparatus according to an embodiment of the present invention; and

FIG. 5 b is a schematic structural diagram of a playlist processing apparatus according to an embodiment of the present invention.

DETAILED DESCRIPTION OF THE EMBODIMENTS

The following clearly and completely describes the technical solutions according to the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the embodiments in the following description are merely a part rather than all of the embodiments of the present invention. All other embodiments obtained by persons skilled in the art based on the embodiments of the present invention without creative effects shall fall within the protection scope of the present invention.

Embodiments of the present invention provide a method, an apparatus, and a system for processing a media resource playlist in a local area network. The embodiments of the present invention are described in detail below respectively:

Embodiment 1

The embodiment of the present invention is described from the perspective of a playlist processing apparatus. Specifically, the playlist processing apparatus may be a control point, or the playlist processing apparatus may include a control point and a central server, that is, the control point and the central server jointly perform operations, where the control point may be integrated with a media renderer, a media server, or a central server into a same entity, and the control point may also be a separate entity.

A method for processing a media resource playlist in a local area network includes: updating a stored playlist and a stored playlist element table when determining that a state of a media server in the local area network changes; and sending the updated playlist to a media renderer in the local area network.

As shown in FIG. 1 b, the specific procedure may be as follows:

101. Update the stored playlist (Playlist) and stored playlist element table (Playlist element table) when determining that the state of the media server in the local area network changes.

The playlist may include information such as a URL of a media resource and a file name of the media resource; the playlist element table may include at least one of a media resource identifier (ResourcelD, Resource Identifier), a media server identifier, an IP address of the media server, and the URL of the media resource, where the media server identifier may be specifically a Uniform unique identifier (UUID, Uniform Unique Identifier) of the media server.

102. Send the updated playlist to the media renderer in the local area network.

As seen above, in this embodiment, when it is determined that the state of the media server changes, the stored playlist and the stored playlist element table are updated, and the updated playlist is sent to the media renderer in the local area network. In the embodiment of the present invention, because the playlist can be updated in real time, consistency between the playlist and the media source can be ensured, so that a continuously valid playlist may be provided to improve the play experience of a user.

Embodiment 2

According to the method described in the first embodiment, before the step of “updating the stored playlist and playlist element table when determining that the state of the media server in the local area network changes (namely, step 101)”, the playlist processing apparatus may further generate a playlist and a playlist element table, and send the generated playlist and playlist element table to the media renderer. For example, as shown in FIG. 2, the specific procedure of the method for processing a media resource playlist in a local area network may be as follows:

201. Obtain media resource information from the media server in the local area network.

For example, specifically, the media resource information may be obtained by sending a browse request (Browse( )) or a search request (Search( )) to the media server, as detailed below:

the playlist processing apparatus sends a browse request or a search request to the media server; and

the media server returns media resource information to the playlist processing apparatus after receiving the browse request or search request.

The media resource information may include information such as a media resource identifier, a media server identifier, an Internet Protocol (IP, Internet Protocol) address of the media server, and a uniform resource locator (URL, Uniform Resource Locator) of a media resource, and in addition, may include information such as the file name of the media resource.

202. Generate a playlist and a playlist element table according to the media resource information obtained in step 201, and store the generated playlist and playlist element table.

The playlist may include information such as the URL of the media resource and the file name of the media resource; the playlist element table may include at least one of the media resource identifier, the media server identifier, the IP address of the media server, and the URL of the media resource, where the media server identifier may be specifically a UUID of the media server.

203. Send the generated playlist to the media renderer in the local area network.

For example, specifically, the media renderer may be requested to invoke a “set static playlist” action class, namely, SetStaticPlaylist( )action, so that a playlist is delivered to the media renderer.

204. Update the stored playlist and the stored playlist element table when determining that the state of the media server changes.

The state change of the media server refers to scenarios where the IP address of the media server changes, the media server is offline, or the media resource of the media server changes, and so on, that is, step 204 may be specifically implemented in one or more of the following modes:

(1) Update the stored playlist and the stored playlist element table when determining, according to the stored playlist element table, that the IP address of the media server changes, as detailed below:

receiving an online announcement message sent by the media server, for example, a Simple Service Discovery Protocol (SSDP, Simple Service Discovery Protocol) message, where the online announcement message carries the IP address of the media server and the media server identifier; and

when determining that the IP address of the media server and the media server identifier carried in the online announcement message are inconsistent with the IP address and the media server identifier in the stored playlist element table, updating the IP address related content in the stored playlist, and updating the IP address of the media server in the playlist element table.

For example, specifically, the corresponding IP address may be found in the stored playlist element table according to the media server identifier carried in the online announcement message, and then the IP address of the media server carried in the online announcement message is compared with the found IP address and if consistent, no action is performed, or if inconsistent, the IP address related content in the stored playlist is updated, and the found IP address is updated.

The IP address related content indicates a record related to the IP address, for example, a URL.

(2) Update the stored playlist and the stored playlist element table when determining that the media server is offline, as detailed below:

if a message indicating that the media server is offline is received or no online announcement message (for example, an SSDP message) sent by the media server is received within a preset time, determining that the media server is offline, and deleting the record corresponding to the media server in the stored playlist, or marking the record corresponding to the media server in the stored playlist as unavailable.

Because the media server sends the online announcement message to the control point or the central server periodically, if the control point or the central server does not receive the online announcement message from the media server within a certain time, it indicates that the media server is offline; in this case, the record corresponding to the media server in the stored playlist and the stored playlist element table may be deleted to avoid deterioration of user experience quality caused by clicking the invalid items. The length of the time may be set according to the actual application requirement.

(3) Update the stored playlist and the stored playlist element table when determining that the media resource of the media server changes, as detailed below:

receiving an event (Event) reported by the media server, where the event indicates the changed media resource on the media server; and

updating the record corresponding to the changed media resource in the stored playlist according to the received event, and updating the record corresponding to the changed media resource in the playlist element table according to the event.

For example, specifically, the media resource identifier may be determined according to the event; then the corresponding record in the playlist element table and the stored playlist is found respectively according to the media resource identifier (that is, searching for the corresponding record in the playlist element table and searching for the corresponding record in the playlist); the URL of the media resource in the record is updated, and the URL of the media resource in the found record in the playlist is updated.

205. Send the updated playlist to the media renderer in the local area network, so that the media renderer uses the updated playlist to replace the original playlist. In this way, the control point can find the updated playlist when querying the playlist of the media renderer, thereby ensuring consistency between the playlist and the media source, that is, ensuring that the playlist is valid.

In addition, the method for processing a media resource playlist in a local area network may further include:

querying the playlist on the media renderer; and sending a play request to the media renderer according to the found playlist on the media renderer, where the play request carries a playlist identifier and a media resource identifier so that the media renderer plays a media resource according to the playlist identifier and media resource identifier.

Specifically, the media server may be a terminal device with a storage function such as a smart phone, a personal computer, a digital camera, a notebook computer, a portable media player, or a removable hard disk. Specifically, the media renderer may be a terminal device capable of displaying media such as a digital television set, a notebook computer, or a personal computer.

As seen above, in this embodiment, media resource information is obtained from the media server in the local area network; a playlist and a playlist element table are generated according to the media resource information and stored; the generated playlist is sent to the media renderer in the local area network; then the stored playlist and the stored playlist element table are updated when it is determined that the state of the media server changes, and the updated playlist is sent to the media renderer in the local area network. In the embodiment of the present invention, because the playlist can be updated in real time, consistency between the playlist and the media source can be ensured, so that a continuously valid playlist may be provided to improve the play experience of a user.

Embodiment 3

A detailed description is provided hereunder by using some examples according to the methods described in the first and second embodiments.

This embodiment is described by using an example in which the playlist processing apparatus is specifically a control point. Specifically, the control point may be integrated into a media renderer, or may also be integrated into a media server, or may also be integrated into some intermediate devices, such as a set top box, a gateway, or an access point device, or may also be a separate entity.

As shown in FIG. 3, the specific procedure may be as follows:

301. The control point obtains media resource information from the media server in the local area network.

For example, specifically, the media resource information may be obtained by sending a browse request (Browse( )) or a search request (Search( )) to the media server, as detailed below:

the control point sends a browse request or a search request to the media server; and

the media server returns media resource information to the control point after receiving the browse request or search request.

The media resource information may include information such as a media resource identifier, a media server identifier, an IP address of the media server, and a URL of a media resource, and in addition, may include information such as a file name of the media resource.

302. The control point generates a playlist and a playlist element table according to the media resource information obtained in step 301, and stores the generated playlist and playlist element table.

The playlist may include the information such as the URL of the media resource and the file name of the media resource. For example, the specific format of the playlist may be as shown in Table 1.

TABLE 1 File Name of Media Resources URL The Adventures of Zhang San http://ip/content1 Story About Li Si http://ip/content2 . . . . . .

A user can select, through the playlist, a media resource to be displayed on the media renderer. For example, when the user wants to play “The Adventures of Zhang San” on the media renderer, the user selects the option with the file name “The Adventures of Zhang San” from the playlist.

The playlist element table may include one or more of the media resource identifier, the media server identifier, the IP address of the media server, and the URL of the media resource, where the media server identifier may be specifically a UUID of the media server. All the following embodiments are described by using an example in which the media server identifier is specifically a UUID. For example, the specific format of the playlist element table may be as shown in Table 2.

TABLE 2 Media Media Resource Server Identifier Identifier (MS ID) IP URL ResourceID 1 UUID1 192.168.5.11 http://ip/content1 ResourceID2 UUID2 192.168.5.9 http://ip/content2 . . . . . . . . . . . .

303. The control point sends the generated playlist to the media renderer.

For example, the control point may request the media renderer to invoke a “set static playlist” action class, namely, “SetStaticPlaylist( )action”, to deliver a playlist to the media renderer.

Arguments of “SetStaticPlaylist( )” may specifically include the information such as the identifier (ID, Identity) of the playlist stored on the media renderer, content of the playlist, and −data length of the playlist, as exemplified in Table 3.

TABLE 3 Direction Related State Variable Argument (Argument) (Direction) (RelatedStateVariable) InstanceID IN Identifier of the playlist stored on the media renderer PlaylistData IN Content of the playlist PlaylistDataLength IN Byte length of the playlist

“InstanceID” indicates the identifier of the playlist stored on the media renderer, namely, a storage identifier allocated by the media renderer to the playlist when the playlist is stored on the media renderer, and used to indicate the storage location of the playlist for querying and searching; “PlaylistData” indicates content of the playlist; and “PlaylistDataLength” indicates the byte length of the playlist. “IN” indicates that the state of the corresponding argument is “input”.

304. The control point monitors the state of the media server in the local area network through an online announcement message, for example, an SSDP message (in the following description, the SSDP message is used as an online announcement message), and updates the stored playlist and the stored playlist element table when determining that the state of the media server changes. For example, the specific process may be as follows:

(1) The control point updates the stored playlist and the stored playlist element table when determining, according to the stored playlist element table, that the IP address of the media server changes, as detailed below:

the control point receives the SSDP message sent by the media server, where the SSDP message carries the IP address of the media server and the media server identifier; and

when determining that the IP address of the media server and the media server identifier carried in the SSDP message are inconsistent with the IP address and the media server identifier in the stored playlist element table, the control point updates the IP address related content in the stored playlist, and updates the IP address of the media server in the playlist element table.

For example, if the media server identifier carried in the SSDP message is “UUID1”, and the IP address of the media server carried in the SSDP message is “192.168.5.12”, it is known, according to Table 2, that the IP address of the media server corresponding to “UUID1” is “192.168.5.11” and is different from the IP address “192.168.5.12” of the media server carried in the SSDP message; therefore, “192.168.5.11” in Table 2 is updated to “192.168.5.12”, and the IP address “192.168.5.11” related content in the playlist is also updated, for example, the original URL “http://192.168.5.11/content1” is updated to “http://192.168.5.12/content1”.

(2) The control point updates the stored playlist and the stored playlist element table when determining that the media server is offline, as detailed below:

If a message indicating that the media server is offline is received or no SSDP message sent by the media server is received within a preset time, the control point determines that the media server is offline, and deletes the record corresponding to the media server in the stored playlist, or marks the record corresponding to the media server in the stored playlist with “unavailable”.

Because the media server sends the SSDP message to the control point or the central server periodically, if the control point or the central server does not receive the SSDP message from the media server within a certain time, it indicates that the media server is offline; in this case, the record corresponding to the media server in the stored playlist and the stored playlist element table may be deleted to avoid deterioration of user experience quality caused by clicking the invalid items. The length of the time may be set according to the actual application requirement.

(3) The control point updates the stored playlist and the stored playlist element table when determining that the media resource of the media server changes, as detailed below:

the control point receives an event reported by the media server, where the event indicates the changed media resource on the media server; and

updates the record corresponding to the changed media resource in the stored playlist according to the received event, and updates the record corresponding to the changed media resource in the playlist element table according to the event.

For example, specifically, the media resource identifier may be determined according to the event; then the corresponding record in the playlist element table and the stored playlist is found respectively according to the media resource identifier (that is, searching for the corresponding record in the playlist element table and searching for the corresponding record in the playlist); the URL of the media resource in the record is updated, and the URL of the media resource in the found record in the playlist is updated.

305. The control point sends the updated playlist to the media renderer.

For example, the control point may request the media renderer to invoke a “set static playlist” action class, namely, “SetStaticPlaylist( )action”, to deliver the updated playlist to the media renderer.

Arguments of “SetStaticPlaylist( )” may specifically include the information such as the identifier of the playlist stored on the media renderer, content of the playlist, and byte length of the playlist, as exemplified in Table 4.

TABLE 4 Direction Related state variable- Argument (Argument) (Direction) (RelatedStateVariable) InstanceID IN Identifier of the playlist stored on the media renderer PlaylistData IN Content of the playlist PlaylistDataLength IN Byte length of the playlist

“InstanceID” indicates the identifier of the playlist stored on the media renderer, namely, a storage identifier allocated by the media renderer to the playlist when the playlist is stored on the media renderer, and used to indicate the storage location of the playlist for querying and searching; “PlaylistData” indicates content of the playlist; and “PlaylistDataLength” indicates the byte length of the playlist. “IN” indicates that the state of the corresponding argument is “input”.

306. The media renderer uses the received updated playlist to replace the original playlist.

307. The control point queries the playlist on the media renderer.

For example, an action class (action) may be added to the media renderer: ScanPlaylist( ) action; in this way, the control point can request the media renderer to invoke the action to query the playlist stored on the media renderer.

Arguments of “ScanPlaylist( )” may specifically include the information such as the identifier of the playlist stored on the media renderer, content of the playlist, and byte length of the playlist, as exemplified in Table 5.

TABLE 5 Direction Related State Variable Argument (Argument) (Direction) (RelatedStateVariable) InstanceID OUT Identifier of the playlist stored on the media renderer PlaylistData OUT Content of the playlist PlaylistDataLength OUT Byte length of the playlist

“InstanceID” indicates the identifier of the playlist stored on the media renderer, namely, a storage identifier allocated by the media renderer to the playlist when the playlist is stored on the media renderer, and used to indicate the storage location of the playlist for querying and searching; “PlaylistData” indicates content of the playlist; and “PlaylistDataLength” indicates the byte length of the playlist. “OUT” indicates that the state of the corresponding argument is “output”.

308. The control point selects a playlist from at least one playlist displayed by the media renderer, and requests the media renderer to play the playlist, for example, the control point may invoke the “play” action class, Play( ) action, in the media renderer to request to play the playlist.

Arguments of “Play( )” may specifically include the information such as the identifier (ID, Identity) of the playlist stored on the media renderer, and a serial number of a content item and a play speed of the playlist, as exemplified in Table 6.

TABLE 6 Argument Direction Related State Variable (Argument) (Direction) (RelatedStateVariable) InstanceID IN Identifier of the playlist stored on the media renderer Index IN Serial number of content item of the playlist, used to indicate which content is played Speed IN Play speed

“InstanceID” indicates the identifier of the playlist stored on the media renderer; “Index” indicates the serial number of content item of the playlist; and “Speed” indicates the play speed. “IN” indicates that the state of the corresponding argument is “input”.

309. The media renderer requests the media resource from the media server according to the playlist selected by the control point.

For example, the media renderer may request the media resource from the media server pointed to by a URI (uniform resource identifier) in the selected playlist through “HTTP Get”.

310. The media server transmits the media resource to the media renderer.

For example, the media server may respond to the “HTTP Get” request of the media renderer, and transmit the media resource to the media renderer.

311. The media renderer plays the media resource.

As seen above, in this embodiment, the control point obtains media resource information from the media server in the local area network, generates a playlist and a playlist element table according to the media resource information and stores the playlist and the playlist element table, sends the generated playlist to the media renderer in the local area network, then updates the stored playlist and the stored playlist element table when determining that the state of the media server changes, and sends the updated playlist to the media renderer in the local area network, so that the media resource may be played subsequently according to the updated playlist. In the embodiment of the present invention, because the playlist can be updated in real time, consistency between the playlist and the media source can be ensured, so that a continuously valid playlist may be provided to improve the play experience of a user.

Embodiment 4

Different from the third embodiment, this embodiment is described by using an example in which the playlist processing apparatus is specifically a control point and a central server. Specifically, the control point may be integrated into a media renderer, or may also be integrated into a media server or a central server, or may also be integrated into some intermediate devices, such as a set top box, a gateway, or an access point device, or may also be a separate entity. The central server may be specifically a terminal device such as a set top box, a gateway, or an access point device. The control point and the central server may be located in the same entity or may also be located in different entities.

As shown in FIG. 4, the specific procedure may be as follows:

401. The central server obtains media resource information from the media server in the local area network.

For example, specifically, the media resource information may be obtained by sending a browse request (Browse( ) or a search request (Search( ) to the media server, as detailed below:

the central server sends a browse request or a search request to the media server; and

the media server returns media resource information to the central server after receiving the browse request or search request.

The media resource information may include information such as a media resource identifier, a media server identifier, an IP address of the media server, and a URL of a media resource, and in addition, may include information such as a file name of the media resource.

402. The control point performs configuration about generating a playlist for the central server, for example, configures the central server to generate a playlist of all media files whose file name extensions are “MP3” in the local area network.

403. The central server generates a playlist and a playlist element table according to the media resource information obtained in step 401 and the configuration in step 402, and stores the generated playlist and playlist element table.

The playlist may include the information such as the URL of the media resource and the file name of the media resource. For example, the specific format of the playlist may be as shown in Table 7.

TABLE 7 File Name of Media Resources URL The Adventures of Zhang San http://ip/content1 Story About Li Si http://ip/content2 . . . . . .

A user can select, through the playlist, a media resource to be displayed on the media renderer. For example, when the user wants to play “The Adventures of Zhang San” on the media renderer, the user selects the option with the file name “The Adventures of Zhang San” from the playlist.

The playlist element table may include one or more of the media resource identifier, the media server identifier, the IP address of the media server, and the URL of the media resource, where the media server identifier may be specifically a UUID of the media server. All the following embodiments are described by using an example in which the media server identifier is specifically a UUID. For example, the specific format of the playlist element table may be as shown in Table 8.

TABLE 8 Media Resource Media Server Identifier Identifier (MS ID) IP URL ResourceID1 UUID1 192.168.5.11 http://ip/content1 ResourceID2 UUID2 192.168.5.9 http://ip/content2 . . . . . . . . . . . .

404. The control point obtains the playlist on the central server.

For example, an action class (action) may be added to the central server: ScanPlaylist( ) action; in this way, the control point can request to invoke the action to obtain the playlist stored on the central server.

Arguments of “ScanPlaylist( )” may specifically include the information such as the identifier of the playlist stored on the media renderer, content of the playlist, and byte length of the playlist, as exemplified in Table 9.

TABLE 9 Argument Direction Related State Variable (Argument) (Direction) (RelatedStateVariable) InstanceID OUT Identifier of the playlist stored on the media renderer PlaylistData OUT Content of the playlist PlaylistDataLength OUT Byte length of the playlist

“InstanceID” indicates the identifier of the playlist stored on the media renderer; “PlaylistData” indicates the content of the playlist; and “PlaylistDataLength” indicates the byte length of the playlist. “OUT” indicates that the state of the corresponding argument is “output”.

405. The control point sends the obtained playlist to the media renderer.

For example, the control point may request the media renderer to invoke a “set static playlist” action class, namely, “SetStaticPlaylist( )action”, to deliver a playlist to the media renderer.

Arguments of “SetStaticPlaylist( )” may specifically include the information such as the identifier (ID, Identity) of the playlist stored on the media renderer, content of the playlist, and byte length of the playlist, as exemplified in Table 10.

TABLE 10 Direction Related State Variable Argument (Argument) (Direction) (RelatedStateVariable) InstanceID IN Identifier of the playlist stored on the media renderer PlaylistData IN Content of the playlist PlaylistDataLength IN Byte length of the playlist

“InstanceID” indicates the identifier of the playlist stored on the media renderer; “PlaylistData” indicates the content of the playlist; and “PlaylistDataLength” indicates the byte length of the playlist. “IN” indicates that the state of the corresponding argument is “input”.

406. The central server monitors the state of the media server in the local area network through an online announcement message, for example, an SSDP message, and updates the stored playlist and the stored playlist element table when determining that the state of the media server changes. For example, the specific process may be as follows:

(1) The central server updates the stored playlist and the stored playlist element table when determining, according to the stored playlist element table, that the IP address of the media server changes, as detailed below:

The central server receives the SSDP message sent by the media server, where the SSDP message carries the IP address of the media server and the media server identifier.

When the central server determines that the IP address of the media server and the media server identifier carried in the SSDP message are inconsistent with the IP address and the media server identifier in the stored playlist element table, the central server updates the IP address related content in the stored playlist, and updates the IP address of the media server in the playlist element table.

For example, if the media server identifier carried in the SSDP message is “UUID1”, and the IP address of the media server in the SSDP message is “192.168.5.12”, it is known, according to Table 2, that the IP address of the media server corresponding to “UUID1” is “192.168.5.11” and is different from the IP address “192.168.5.12” of the media server carried in the SSDP message; therefore, “192.168.5.11” in Table 2 is updated to “192.168.5.12”, and the IP address “192.168.5.11” related content in the playlist is also updated.

(2) The central server updates the stored playlist and the stored playlist element table when determining that the media server is offline, as detailed below:

If a message indicating that the media server is offline is received or no SSDP message sent by the media server is received within a preset time, the central server determines that the media server is offline, and deletes the record corresponding to the media server in the stored playlist, or marks the record corresponding to the media server in the stored playlist as “unavailable”.

Because the media server sends the SSDP message to the control point or the central server periodically, if the control point or the central server does not receive the SSDP message from the media server within a certain time, it indicates that the media server is offline; in this case, the record corresponding to the media server in the stored playlist and the stored playlist element table may be deleted to avoid deterioration of user experience quality caused by clicking the invalid items. The length of the time may be set according to the actual application requirement.

(3) The central server updates the stored playlist and the stored playlist element table when determining that the media resource of the media server changes, as detailed below:

the central server receives an event reported by the media server, where the event indicates the changed media resource on the media server; and

the central server updates the record corresponding to the changed media resource in the stored playlist according to the event, and updates the record corresponding to the changed media resource in the playlist element table according to the event.

For example, specifically, the central server may determine the media resource identifier according to the event, then search for the corresponding record respectively in the playlist element table and the stored playlist according to the media resource identifier (that is, searching for the corresponding record in the playlist element table and searching for the corresponding record in the playlist), update the URL of the media resource in the record, and update the URL of the media resource in the found record in the playlist.

407. The central server sends the updated playlist to the media renderer.

For example, the central server may request the media renderer to invoke a “set static playlist” action class, namely, “SetStaticPlaylist( )action”, to deliver the updated playlist to the media renderer.

Arguments of “SetStaticPlaylist( )” may specifically include the information such as the identifier of the playlist stored on the media renderer, content of the playlist, and byte length of the playlist, as exemplified in Table 11.

TABLE 11 Argument Direction Related state variable, (Argument) (Direction) (RelatedStateVariable) InstanceID IN Identifier of the playlist stored on the media renderer PlaylistData IN Content of the playlist PlaylistDataLength IN Byte length of the playlist

“InstanceID” indicates the identifier of the playlist stored on the media renderer; “PlaylistData” indicates the content of the playlist; and “PlaylistDataLength” indicates the byte length of the playlist. “IN” indicates that the state of the corresponding argument is “input”.

408. The media renderer uses the received updated playlist to replace the original playlist.

409. The control point queries the playlist on the media renderer.

For example, an action class (action) may be added to the media renderer: ScanPlaylist( ) action; in this way, the control point can request to invoke the action to query the playlist stored on the media renderer.

Arguments of “ScanPlaylist( )” may specifically include the information such as the identifier of the playlist stored on the media renderer, content of the playlist, and byte length of the playlist, as exemplified in Table 12.

TABLE 12 Argument Direction Related State Variable (Argument) (Direction) (RelatedStateVariable) InstanceID OUT Identifier of the playlist stored on the media renderer PlaylistData OUT Content of the playlist PlaylistDataLength OUT Byte length of the playlist

“InstanceID” indicates the identifier of the playlist stored on the media renderer; “PlaylistData” indicates the content of the playlist; and “PlaylistDataLength” indicates the byte length of the playlist. “IN” indicates that the state of the corresponding argument is “output”.

410. The control point selects a playlist from at least one playlist displayed by the media renderer, and requests the media renderer to play the playlist, for example, the control point may invoke the “play” action class, Play( ) action, in the media renderer to request to play the playlist.

Arguments of “Play( )” may specifically include the information such as the identifier (ID, Identity) of the playlist stored on the media renderer, and a serial number of content item and a play speed of the playlist, as exemplified in Table 13.

TABLE 13 Argument Direction Related State Variable (Argument) (Direction) (RelatedStateVariable) InstanceID IN Identifier of the playlist stored on the media renderer Index IN Serial number of content items of the playlist, used to indicate which content is played Speed IN Play speed

“InstanceID” indicates the identifier of the playlist stored on the media renderer; “Index” indicates the serial number of content item of the playlist; and “Speed” indicates the play speed. “IN” indicates that the state of the corresponding argument is “input”.

411. The media renderer requests the media resource from the media server according to the playlist selected by the control point.

For example, the media renderer may request the media resource from the media server pointed to by the URI in the selected playlist through “HTTP Get”.

412. The media server transmits the media resource to the media renderer.

For example, the media server may respond to the “HTTP Get” request of the media renderer, and transmit the media resource to the media renderer.

413. The media renderer plays the media resource.

As seen above, in this embodiment, the central server obtains media resource information from the media server in the local area network, generates a playlist and a playlist element table according to the media resource information and stores the playlist and the playlist element table, sends the generated playlist to the media renderer in the local area network through the control point, then updates the stored playlist and the stored playlist element table when determining that the state of the media server changes, and sends the updated playlist to the media renderer in the local area network, so that the media resource may be played subsequently according to the updated playlist. In the embodiment of the present invention, because the playlist can be updated in real time, consistency between the playlist and the media source can be ensured, so that a continuously valid playlist may be provided to improve the play experience of a user.

Embodiment 5

To better implement the above method, the embodiment of the present invention further provides a playlist processing apparatus accordingly; as shown in FIG. 5 a, the playlist processing apparatus includes an updating unit 503 and a sending unit 504.

The updating unit 503 is configured to update a stored playlist and a stored playlist element table when determining that the state of a media server in a local area network changes.

The playlist may include information such as a URL of a media resource and a file name of the media resource; the playlist element table may include at least one of a media resource identifier, a media server identifier, an IP address of the media server, and the URL of the media resource, where the media server identifier may be specifically a UUID of the media server.

The sending unit 504 is configured to send the updated playlist to a media renderer in the local area network when the playlist is updated.

In addition, as shown in FIG. 5 b, the playlist processing apparatus may further include an obtaining unit 501 and a generating unit 502.

The obtaining unit 501 is configured to obtain media resource information from the media server in the local area network.

For example, specifically, the media resource information may be obtained by sending a browse request or a search request to the media server.

The media resource information may include information such as a media resource identifier, a media server identifier, an IP address of the media server, and a URL of a media resource, and in addition, may include information such as a file name of the media resource.

The generating unit 502 is configured to generate a playlist and a playlist element table according to the media resource information obtained by the obtaining unit 501, and store the playlist and the playlist element table.

The playlist may include information such as a URL of a media resource and a file name of the media resource; the playlist element table may include at least one of a media resource identifier, a media server identifier, an IP address of the media server, and the URL of the media resource, where the media server identifier may be specifically a UUID of the media server.

In this case, the updating unit 503 is specifically configured to update the playlist and playlist element table stored by the generating unit 502, when determining that the state of the media server changes.

The sending unit 504 is specifically configured to send the playlist generated by the generating unit 502 to the media renderer in the local area network, and when the playlist is updated, send the playlist updated by the updating unit 503 to the media renderer in the local area network.

For example, specifically, the media renderer may be requested to invoke a “set static playlist” action class, namely, SetStaticPlaylist( )action, so that a playlist is delivered to the media renderer.

The state change of the media server refers to scenarios where the IP address of the media server changes, the media server is offline, or the media resource of the media server changes, and so on, that is, the updating unit 503 includes a first updating subunit, and/or a second updating subunit, and/or a third updating subunit.

The first updating subunit may be specifically configured to update the stored playlist and the stored playlist element table when determining, according to the stored playlist element table, that the Internet Protocol address of the media server changes.

The second updating subunit may be specifically configured to update the stored playlist and the stored playlist element table when determining that the media server is offline.

The third updating subunit may be specifically configured to update the stored playlist and the stored playlist element table when determining that the media resource of the media server changes.

For example, the first updating subunit may be specifically configured to: receive an online announcement message sent by the media server, where the online announcement message carries an IP address of the media server and a media server identifier; and when determining that the IP address of the media server and the media server identifier carried in the online announcement message are inconsistent with the IP address and the media server identifier in the playlist element table, update IP address related content in the stored playlist, for example, a URL, and update the IP address of the media server in the playlist element table; and/or

the second updating subunit may be specifically configured to: if no online announcement message sent by the media server is received within a preset time, determine that the media server is offline, and delete the record corresponding to the media server in the stored playlist, or mark the record corresponding to the media server in the stored playlist as unavailable; and/or

the third updating subunit may be specifically configured to: receive an event reported by the media server, where the event indicates the changed media resource on the media server, update the record corresponding to the changed media resource in the stored playlist according to the received event, and update the record corresponding to the changed media resource in the playlist element table according to the event.

The online announcement message may be specifically an SSDP message.

In addition, the playlist processing apparatus may include a list querying unit and a play requesting unit.

The list querying unit is configured to query the playlist on the media renderer.

The play requesting unit is configured to send a play request to the media renderer according to the found playlist on the media renderer, where the play request carries a playlist identifier and a media resource identifier so that the media renderer plays a media resource according to the playlist identifier and the media resource identifier.

In the specific implementation, the above units may be implemented by separate entities, or may be combined in any way and implemented by one or several entities. For the specific implementation of the above units, reference may be made to the above embodiments, and details are omitted herein.

Specifically, the playlist processing apparatus may be a control point, or the playlist processing apparatus may also include a control point and a central server, that is, the control point and the central server jointly perform operations. Specifically, the control point may be integrated with the media renderer into a same entity, or may also be integrated with the media server into a same entity, or may also be integrated with the central server into a same entity, or may be a separate entity. The central server may be specifically a terminal device such as a set top box, a gateway, or an access point device. The control point and the central server may be located in the same entity or may also be located in different entities.

Specifically, the media server may be a terminal device with a storage function such as a smart phone, a personal computer, a digital camera, a notebook computer, a portable media player, or a removable hard disk. Specifically, the media renderer may be a terminal device capable of displaying media such as a digital television set, a notebook computer, or a personal computer.

As seen above, in this embodiment, the obtaining unit 501 of the playlist processing apparatus may obtain media resource information from the media server in the local area network; the generating unit 502 generates a playlist and a playlist element table according to the media resource information and stores the playlist and the playlist element table; then the sending unit 504 sends the generated playlist to the media renderer in the local area network; the updating unit 503 updates the stored playlist and the stored playlist element table when determining that the state of the media server changes, and sends the updated playlist to the media renderer through the sending unit 504. In the embodiment of the present invention, because the playlist can be updated in real time, consistency between the playlist and the media source can be ensured, so that a continuously valid playlist may be provided to improve the play experience of a user.

Embodiment 6

Accordingly, the embodiment of the present invention further provides a communication system, including any playlist processing apparatus according to the embodiment of the present invention, where the playlist processing apparatus may specifically refer to the fifth embodiment. For example, the specific apparatus may be as follows:

The playlist processing apparatus is configured to: obtain media resource information from the media server in the local area network, generate a playlist and a playlist element table according to the media resource information, and store the playlist and the playlist element table; update the stored playlist and the stored playlist element table when determining that the state of the media server changes; and send the updated playlist to the media renderer in the local area network.

The playlist may include information such as a URL of a media resource and a file name of the media resource; the playlist element table may include at least one of a media resource identifier, a media server identifier, an IP address of the media server, and the URL of the media resource, where the media server identifier may be specifically a UUID of the media server.

The state change of the media server refers to scenarios where the IP address of the media server changes, the media server is offline, or the media resource of the media server changes, and so on.

The playlist processing apparatus is specifically configured to: update the stored playlist and the stored playlist element table when determining, according to the stored playlist element table, that the Internet Protocol address of the media server changes; or update the stored playlist and the stored playlist element table when determining that the media server is offline; or update the stored playlist and the stored playlist element table when determining that the media resource of the media server changes. For example, the specific process may be as follows:

(1) Update the stored playlist and the stored playlist element table when determining, according to the stored playlist element table, that the IP address of the media server changes, as detailed below:

receiving an online announcement message sent by the media server, where the online announcement message carries an IP address of the media server and a media server identifier; and

when determining that the IP address of the media server and the media server identifier carried in the online announcement message are inconsistent with the IP address and the media server identifier in the stored playlist element table, updating the IP address related content in the stored playlist, for example, a URL, and updating the IP address of the media server in the playlist element table.

(2) Update the stored playlist and the stored playlist element table when determining that the media server is offline, as detailed below:

if no online announcement message sent by the media server is received within a preset time, determining that the media server is offline, and deleting the record corresponding to the media server in the stored playlist, or marking the record corresponding to the media server in the stored playlist as unavailable.

(3) Update the stored playlist and the stored playlist element table when determining that the media resource of the media server changes, as detailed below:

receiving an event reported by the media server, updating the record corresponding to the changed media resource in the stored playlist according to the received event, and updating the record corresponding to the changed media resource in the playlist element table according to the event.

The online announcement message may be specifically an SSDP message.

The playlist processing apparatus is further configured to: query the playlist on the media renderer; and send a play request to the media renderer according to the found playlist on the media renderer, where the play request carries a playlist identifier and a media resource identifier so that the media renderer plays a media resource according to the playlist identifier and the media resource identifier.

In addition, the communication system may further include a media renderer and a media server.

The media renderer is configured to: receive the playlist sent by the playlist processing apparatus, receive the play request sent by the playlist processing apparatus, obtain the media resource from the media server according to the play request of the playlist processing apparatus, and play the media resource.

The media server is configured to send the media resource information to the playlist processing apparatus and provide the resource to the media renderer for playing.

The specific implementation of the above devices may refer to the above embodiments, and details are omitted herein.

As seen above, in this embodiment, the playlist processing apparatus of the communication system obtains media resource information from the media server in the local area network, generates a playlist and a playlist element table according to the media resource information and stores the playlist and the playlist element table, sends the generated playlist to the media renderer in the local area network, then updates the stored playlist and the stored playlist element table when determining that the state of the media server changes, and sends the updated playlist to the media renderer in the local area network. In the embodiment of the present invention, because the playlist can be updated in real time, consistency between the playlist and the media source can be ensured, so that a continuously valid playlist may be provided to improve the play experience of a user.

Persons of ordinary skill in the art may understand that all or part of the steps of the various methods in the foregoing embodiments may be implemented by a program instructing relevant hardware. The program may be stored in a computer readable storage medium. The storage media may include: a read only memory (ROM, Read Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk, or a compact disk.

A method, an apparatus, and a system for processing a media resource playlist in a local area network that are provided in the embodiments of the present invention are introduced in detail in the foregoing. In this specification, specific examples are used for illustrating principles and implementation manners of the present invention. The foregoing descriptions of the embodiments are merely used to help understand the method and core idea of the present invention. Meanwhile, persons skilled in the art may make modifications to the specific implementation manners and application scopes according to the idea of the present invention. In conclusion, the content of the specification shall not be construed as a limitation to the present invention. 

1. A method for processing a media resource playlist in a local area network, wherein the local area network comprises a media server and a media renderer, and the method comprises: updating a stored playlist and a stored playlist element table when determining that a state of the media server changes; and sending the updated playlist to the media renderer.
 2. The method according to claim 1, wherein the playlist comprises a uniform resource locator of a media resource and/or a file name of the media resource, and the playlist element table comprises at least one of a media resource identifier, a media server identifier, an Internet Protocol address of the media server, and the uniform resource locator of the media resource.
 3. The method according to claim 2, wherein before the updating a stored playlist and a stored playlist element table when determining that a state of the media server changes, the method further comprises: obtaining media resource information from the media server; generating a playlist and a playlist element table according to the media resource information, and storing the playlist and the playlist element table; and sending the generated playlist to the media renderer.
 4. The method according to claim 3, wherein the updating a stored playlist and a stored playlist element table when determining that a state of the media server changes comprises one of: updating the stored playlist and the stored playlist element table when determining, according to the stored playlist element table, that the Internet Protocol address of the media server changes; updating the stored playlist and the stored playlist element table when determining that the media server is offline; or updating the stored playlist and the stored playlist element table when determining that the media resource of the media server changes.
 5. The method according to claim 4, wherein the updating the stored playlist and the stored playlist element table when determining, according to the stored playlist element table, that an Internet Protocol address of the media server changes comprises: receiving an online announcement message sent by the media server, wherein the online announcement message carries the Internet Protocol address of the media server and a media server identifier; and when determining that the Internet Protocol address of the media server and the media server identifier carried in the online announcement message are inconsistent with the Internet Protocol address and the media server identifier in the stored playlist element table, updating Internet Protocol address related content in the stored playlist, and updating the Internet Protocol address of the media server in the playlist element table.
 6. The method according to claim 4, wherein the updating the stored playlist and the stored playlist element table when determining that the media server is offline comprises: if a message indicating that the media server is offline is received or no online announcement message sent by the media server is received within a preset time, determining that the media server is offline, and deleting a record corresponding to the media server in the stored playlist, or marking the record corresponding to the media server in the stored playlist as unavailable.
 7. The method according to claim 4, wherein the updating the stored playlist and the stored playlist element table when determining that the media resource of the media server changes comprises: receiving an event reported by the media server, wherein the event indicates the changed media resource on the media server, updating a record corresponding to the changed media resource in the stored playlist according to the event, and updating a record corresponding to the changed media resource in the playlist element table according to the event.
 8. The method according to claim 4 further comprising: querying the playlist on the media renderer; and sending a play request to the media renderer according to the found playlist on the media renderer, wherein the play request carries a playlist identifier and the media resource identifier so that the media renderer plays the media resource according to the playlist identifier and the media resource identifier.
 9. A playlist processing apparatus, comprising: an updating unit, configured to update a stored playlist and a stored playlist element table when determining that a state of a media server in a local area network changes; and a sending unit, configured to send the updated playlist to a media renderer in the local area network when the playlist is updated.
 10. The playlist processing apparatus according to claim 9, wherein the playlist comprises a uniform resource locator of a media resource and a file name of the media resource, and the playlist element table comprises at least one of a media resource identifier, a media server identifier, an Internet Protocol address of the media server, and the uniform resource locator of the media resource.
 11. The playlist processing apparatus according to claim 10, further comprising: an obtaining unit, configured to obtain media resource information from the media server in the local area network; and a generating unit, configured to generate a playlist and a playlist element table according to the media resource information, and store the playlist and the playlist element table; wherein the sending unit is further configured to send the generated playlist to the media renderer in the local area network.
 12. The playlist processing apparatus according to claim 11, wherein the updating unit comprises one of: a first updating subunit, specifically configured to update the stored playlist and the stored playlist element table when determining, according to the stored playlist element table, that the Internet Protocol address of the media server changes; a second updating subunit, specifically configured to update the stored playlist and the stored playlist element table when determining that the media server is offline; and a third updating subunit, specifically configured to update the stored playlist and the stored playlist element table when determining that the media resource of the media server changes.
 13. The playlist processing apparatus according to claim 12, wherein: the first updating subunit is specifically configured to: receive an online announcement message sent by the media server, wherein the online announcement message carries the Internet Protocol address of the media server and a media server identifier; and when determining that the Internet Protocol address of the media server and the media server identifier carried in the online announcement message are inconsistent with the Internet Protocol address and the media server identifier in the stored playlist element table, update Internet Protocol address related content in the stored playlist, and update the Internet Protocol address of the media server in the playlist element table.
 14. The playlist processing apparatus according to claim 12, wherein: the second updating subunit is specifically configured to: if a message indicating that the media server is offline is received or no online announcement message sent by the media server is received within a preset time, determine that the media server is offline, and delete a record corresponding to the media server in the stored playlist, or mark the record corresponding to the media server in the stored playlist as unavailable.
 15. The playlist processing apparatus according to claim 12, wherein: the third updating subunit is specifically configured to: receive an event reported by the media server, wherein the event indicates the changed media resource on the media server, update a record corresponding to the changed media resource in the stored playlist according to the event, and update a record corresponding to the changed media resource in the playlist element table according to the event.
 16. The playlist processing apparatus according to claim 12, further comprising: a list querying unit, configured to query the playlist on the media renderer; and a play requesting unit, configured to send a play request to the media renderer according to the found playlist on the media renderer, wherein the play request carries a playlist identifier and the media resource identifier so that the media renderer plays the media resource according to the playlist identifier and the media resource identifier. 